package com.springboot.demo.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.springboot.demo.entity.Record;
import org.apache.ibatis.annotations.Select;
import java.util.List;

public interface RBorrowRecordMapper extends BaseMapper<Record> {
    @Select("Select  returntable.phone,returntable.id,returntable.start_time,returntable.end_time,returntable.days,returntable.fine,book.bname from returntable,book where (returntable.id=book.id and returntable.phone=#{phonenum})")
    List<Record> getPhone1(String phonenum);

    @Select("Select  borrow.phone,borrow.id,borrow.start_time,book.bname from borrow,book where (borrow.id=book.id and borrow.phone=#{phonenum} and state='borrowing')")
    List<Record> getPhone2(String phonenum);
}